package com.wjl.shop.controller;

import com.wjl.shop.entity.StatusTable;
import com.wjl.shop.service.StatusTableService;

import java.util.List;
import java.util.Map;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 状态表(StatusTable)表控制层
 *
 * @author makejava
 * @since 2021-10-06 14:43:21
 */
@RestController
@RequestMapping("statusTable")
@CrossOrigin
public class StatusTableController {
    /**
     * 服务对象
     */
    @Resource
    private StatusTableService statusTableService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public StatusTable selectOne(Integer id) {
        return this.statusTableService.queryById(id);
    }
    /**
     * 查询状态
     * */
    @GetMapping("selectState")
    public Map<String,Object> selectState(){
        return this.statusTableService.selectState();
    }
}
